﻿@using Microsoft.AspNetCore.Mvc.Localization
@using Skoruba.IdentityServer4.Admin.UI.Configuration.Constants
@model Skoruba.IdentityServer4.Admin.BusinessLogic.Identity.Dtos.Identity.Interfaces.IUserProviderDto
@inject IViewLocalizer Localizer

@{
	ViewBag.Title = Localizer["PageTitle"];
	Layout = "_Layout";
}

<form asp-area="@CommonConsts.AdminUIArea" asp-controller="Identity" asp-action="UserProvidersDelete" Method="post">
	<div class="row">
		
		<div class="col-12">
			<nav aria-label="breadcrumb">
				<ol class="breadcrumb">
					<li class="breadcrumb-item"><a asp-area="@CommonConsts.AdminUIArea" asp-controller="Identity" asp-action="Users">@Localizer["NavigationUsers"]</a></li>
					<li class="breadcrumb-item"><a asp-area="@CommonConsts.AdminUIArea" asp-controller="Identity" asp-action="UserProfile" asp-route-id="@Model.UserId">@Model.UserName</a></li>
					<li class="breadcrumb-item"><a asp-area="@CommonConsts.AdminUIArea" asp-controller="Identity" asp-action="UserProviders" asp-route-id="@Model.UserId">@Localizer["NavigationUserProviders"]</a></li>
					<li class="breadcrumb-item active" aria-current="page">@Localizer["PageTitle"]</li>
				</ol>
			</nav>
		</div>

		<div class="col-md-12">
			<h3>@Localizer["PageTitle"]</h3>
			
			<!--Hidden -->
			<input type="hidden" asp-for="UserId"/>

			<div class="card mt-3">
				<h5 class="card-header">@Localizer["PanelTitle"]</h5>
				<div class="card-body">

					<!--Input - text -->
					<div class="form-group row">
						<label asp-for="LoginProvider" class="col-sm-3 col-form-label">
							@await Html.PartialAsync("User/Section/Label", "UserProviderLoginProvider")
						</label>
						<div class="col-sm-9">
							<!--Hidden -->
							<input type="hidden" asp-for="LoginProvider" />
							<input type="text" disabled="disabled" class="form-control" asp-for="LoginProvider">
						</div>
					</div>

					<!--Input - text -->
					<div class="form-group row">
						<label asp-for="ProviderKey" class="col-sm-3 col-form-label">
							@await Html.PartialAsync("User/Section/Label", "UserProviderProviderKey")
						</label>
						<div class="col-sm-9">
							<!--Hidden -->
							<input type="hidden" asp-for="ProviderKey" />
							<input type="text" disabled="disabled" class="form-control" asp-for="ProviderKey">
						</div>
					</div>

					<!--Input - text -->
					<div class="form-group row">
						<label asp-for="ProviderDisplayName" class="col-sm-3 col-form-label">
							@await Html.PartialAsync("User/Section/Label", "UserProviderProviderDisplayName")
						</label>
						<div class="col-sm-9">
							<input type="text" disabled="disabled" class="form-control" asp-for="ProviderDisplayName">
						</div>
					</div>

					<!--Button-->
					<div class="form-group row">
						<label class="col-sm-3 col-form-label">
						</label>
						<div class="col-sm-9">
							<button type="submit" class="btn btn-danger">@Localizer["ButtonDeleteUserProvider"]</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</form>